package com.pyue.eam.admin.api.entity.regi;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pyue.eam.admin.api.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.javers.core.metamodel.annotation.PropertyName;

import java.util.List;

/**
 * 零件库
 *
 * @author lucc
 * @date 2023-10-12 20:38:39
 */
@Data
@TableName("cq_part_lib")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "零件库")
// @JsonBind(JsonBindStrategy.Type.PART_EXT)
public class PartLibEntity extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 零件名称
     */
    @Schema(description = "零件名称")
    // 该注解可以指定数据审计输出内容
    @PropertyName("零件名称")
    private String partName;

    /**
     * 零件号
     */
    @Schema(description = "零件号")
    private String partCode;

    /**
     * 零件类型(dict:part_type)
     */
    // @FieldBind(type = BindType.DICT + "part_type", target = "partTypeTrans")
    @Schema(description = "零件类型")
    private String partType;

    @TableField(exist = false)
    private String partTypeTrans;

    /**
     * 零件类型(dict:car)
     */
    // @FieldBind(type = BindType.DICT + "car", target = "carTypeTrans")
    @Schema(description = "车型")
    private String carType;

    @TableField(exist = false)
    private String carTypeTrans;

    /**
     * 客户集合
     */
    // @TableField(exist = false)
    @Schema(description = "客户简称-逗号拼接")
    // @FieldBind(type = BindType.DICT + "client", target = "clientsTrans")
    private String clientIds;

    @TableField(exist = false)
    private String clientsTrans;


    /**
     * 客户零件关联
     */
    @TableField(exist = false)
    @Schema(description = "客户集合")
    private List<PartClientHref> partClientHrefList;

    /**
     * 关联文件件
     */
    @Schema(description = "关联文件-逗号分割")
    private String pilotCheckFile;

    /**
     * 零件负责人
     */
    @Schema(description = "零件负责人")
    // @FieldBind(type = BindType.USER_NAME, target = "chargeManTrans")
    private String chargeMan;

    /**
     * 零件负责人
     */
    @Schema(description = "零件负责人")
    @TableField(exist = false)
    private String chargeManTrans;

    /**
     * 装箱数
     */
    @Schema(description = "装箱数")
    private Integer boxNum;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

}

